/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
 * Description: 集合通信建链诉求计算派生类实现文件(AHC-broke算法)
 */

#include "calc_ahc_broke_transport_req.h"

namespace hccl {
CalcAHCBrokeTransportReq::CalcAHCBrokeTransportReq(std::vector<std::vector<u32>> &subCommPlaneVector,
    std::vector<bool> &isBridgeVector, u32 userRank, std::vector<std::vector<u32>> &subGroups)
    : CalcAHCTransportReqBase(subCommPlaneVector, isBridgeVector, userRank, subGroups)
{
}

CalcAHCBrokeTransportReq::~CalcAHCBrokeTransportReq()
{
}

HcclResult CalcAHCBrokeTransportReq::CommAHCInfoInit(std::vector<std::vector<u32>> &subGroups)
{
    commAHCBaseInfo_.reset(new (std::nothrow) CommBrokeAlignInfo(subGroups));
    CHK_SMART_PTR_NULL(commAHCBaseInfo_);
    CHK_RET(commAHCBaseInfo_->Init());
    return HCCL_SUCCESS;
}
}  // namespace hccl
